package com.study_online.mapper;

import com.study_online.domain.Barrage;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface BarrageMapper {

    @Select("select brmessage from barrage")
    List<String> findAll();

    @Insert("insert into barrage(userid,videoid,brmessage,addtime) values(#{userid},#{videoid},#{brmessage},#{addtime})")
    void save(Barrage barrage);
}
